home *** CD-ROM | disk | FTP | other *** search
- Subject: Re:Scripting
- Sent: 6/27/96 9:26 AM
- Received: 6/27/96 9:40 AM
- From: Greg Friedman, friedman@cognosis.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- At 2:30 PM 6/27/96, Stephane SILVESTRE wrote:
-
- > I've wanted to make my part scriptable, but it seems like my dictionnary
- > isn't recognized by the Script Editor. I always get a syntax error
- > "expected class name but got identifier" but if I open the part's
- > dictionnary, my class is well defined. Have I missed something ?
-
- For the Script Editor to compile a script against your dictionary, you must
- have an instance of your part up and running. You must specify the running
- part in the "tell" block of the script.
-
- For example, if your part editor is called SurfWriter, create a new
- document called "SurfWriter Sample". Save the document and reopen it. This
- is necessary because the first time you create a document, the name of the
- document is out of synch its process name. With your document open, type:
-
- tell application "SurfWriter Sample"
- ...
- end tell
-
- When you double-click your document to open it, a small application called
- the OpenDoc Launcher actually launches and then sub-launches your document.
- Make sure you wait for the OpenDoc Launcher to quit before attempting to
- compile your script. If you don't wait, your script will be compiled
- against the launcher, instead of against your part.
-
- > PS: as Mark Lanett, I would very appreciate a simple extension example
- > showing one server and one client parts.
-
- This is in the works. I wrote a simple extension called "ColorExtension".
- It has two methods, SetForeColor and SetBackColor. It has clearly-defined
- API's for clients and servers, and should serve as a good model for writing
- extensions. We'll try to get it out on the net next week.
-
- gsf.
-
-
- _________________________________________________________
- Greg Friedman ODF Engineering Apple Computer
-
-